package com.ptc.ims.shared;

import java.io.Serializable;

@SuppressWarnings("serial")
public class InventoryException extends Exception implements Serializable {
	private Product item;

	public InventoryException() {
		super("Transaction error.");
	}

	public InventoryException(String message) {
		super(message);
	}

	public InventoryException(String message, Product itemInfo) {
		super(message);
		this.item = new Product(itemInfo.getId(), itemInfo.getName(), itemInfo.getPrice());
	}

	public Product getItemInfo() {
		return item;
	}
}